package com.mathassistant.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.mathassistant.client.helper.ClickPoint;
import com.mathassistant.shared.TopicDTO;

public class ShowTopicPopupEvent extends GwtEvent<ShowTopicPopupEventHandler> {

	public static Type<ShowTopicPopupEventHandler> TYPE = new Type<ShowTopicPopupEventHandler>();
	private final TopicDTO topic;
	private final ClickPoint point;

	public TopicDTO getTopic() {
		return topic;
	}

	public ClickPoint getPoint() {
		return point;
	}

	public ShowTopicPopupEvent(TopicDTO topic, ClickPoint point) {
		// TODO Auto-generated constructor stub
		this.topic = topic;
		this.point = point;
	}

	@Override
	public Type<ShowTopicPopupEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	@Override
	protected void dispatch(ShowTopicPopupEventHandler handler) {
		// TODO Auto-generated method stub
		handler.OnShowTopicPopup(this);
	}

}
